Optimal. Leaf size=236 \[ \frac {2 (21 A+19 C) \tan (c+d x) \sec ^2(c+d x)}{105 d \sqrt {a \sec (c+d x)+a}}-\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {2 (21 A+29 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 a d}+\frac {4 (147 A+143 C) \tan (c+d x)}{315 d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}}-\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.80, antiderivative size = 236, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4089, 4021, 4010, 4001, 3795, 203} \[ \frac {2 (21 A+19 C) \tan (c+d x) \sec ^2(c+d x)}{105 d \sqrt {a \sec (c+d x)+a}}-\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {2 (21 A+29 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 a d}+\frac {4 (147 A+143 C) \tan (c+d x)}{315 d \sqrt {a \sec (c+d x)+a}}+\frac {2 C \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}}-\frac {2 C \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3795
Rule 4001
Rule 4010
Rule 4021
Rule 4089
Rubi steps
\begin {align*} \int \frac {\sec ^4(c+d x) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx &=\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {2 \int \frac {\sec ^4(c+d x) \left (\frac {1}{2} a (9 A+8 C)-\frac {1}{2} a C \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{9 a}\\ &=-\frac {2 C \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {4 \int \frac {\sec ^3(c+d x) \left (-\frac {3 a^2 C}{2}+\frac {3}{4} a^2 (21 A+19 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{63 a^2}\\ &=\frac {2 (21 A+19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {8 \int \frac {\sec ^2(c+d x) \left (\frac {3}{2} a^3 (21 A+19 C)-\frac {3}{8} a^3 (21 A+29 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{315 a^3}\\ &=\frac {2 (21 A+19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (21 A+29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}+\frac {16 \int \frac {\sec (c+d x) \left (-\frac {3}{16} a^4 (21 A+29 C)+\frac {3}{8} a^4 (147 A+143 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{945 a^4}\\ &=\frac {4 (147 A+143 C) \tan (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (21 A+19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (21 A+29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}+(-A-C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx\\ &=\frac {4 (147 A+143 C) \tan (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (21 A+19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (21 A+29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}+\frac {(2 (A+C)) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {4 (147 A+143 C) \tan (c+d x)}{315 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (21 A+19 C) \sec ^2(c+d x) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}-\frac {2 C \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 C \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (21 A+29 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 6.73, size = 474, normalized size = 2.01 \[ \frac {\cos ^2(c+d x) \sqrt {\sec (c+d x)+1} \sqrt {(\cos (c+d x)+1) \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {4 \sec (c) \sec ^2(c+d x) (-63 A \sin (d x)+40 C \sin (c)-97 C \sin (d x))}{315 d}+\frac {4 \sec (c) \sec (c+d x) (63 A \sin (c)-84 A \sin (d x)+97 C \sin (c)-126 C \sin (d x))}{315 d}+\frac {4 \sec \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right ) \left (357 A \sin \left (\frac {d x}{2}\right )+383 C \sin \left (\frac {d x}{2}\right )\right )}{315 d}+\frac {8 \sin \left (\frac {c}{2}\right ) (273 A \cos (c)-84 A+257 C \cos (c)-126 C)}{315 d \left (\cos \left (\frac {c}{2}\right )+\cos \left (\frac {3 c}{2}\right )\right )}+\frac {4 C \sec (c) \sin (d x) \sec ^4(c+d x)}{9 d}+\frac {4 \sec (c) \sec ^3(c+d x) (7 C \sin (c)-8 C \sin (d x))}{63 d}\right )}{\sqrt {a (\sec (c+d x)+1)} (A \cos (2 c+2 d x)+A+2 C)}-\frac {2 \sqrt {2} (A+C) \sin (c+d x) \cos ^4(c+d x) \sqrt {\sec (c+d x)-1} (\sec (c+d x)+1)^2 \tan ^{-1}\left (\frac {\sqrt {\sec (c+d x)-1}}{\sqrt {2}}\right ) \left (A+C \sec ^2(c+d x)\right )}{d (\cos (c+d x)+1) \sqrt {1-\cos ^2(c+d x)} \sqrt {a (\sec (c+d x)+1)} \sqrt {\cos ^2(c+d x) (\sec (c+d x)-1) (\sec (c+d x)+1)} (A \cos (2 c+2 d x)+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 445, normalized size = 1.89 \[ \left [\frac {315 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right )^{5} + {\left (A + C\right )} a \cos \left (d x + c\right )^{4}\right )} \sqrt {-\frac {1}{a}} \log \left (\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, \cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left ({\left (273 \, A + 257 \, C\right )} \cos \left (d x + c\right )^{4} - {\left (21 \, A + 29 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (21 \, A + 19 \, C\right )} \cos \left (d x + c\right )^{2} - 5 \, C \cos \left (d x + c\right ) + 35 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{630 \, {\left (a d \cos \left (d x + c\right )^{5} + a d \cos \left (d x + c\right )^{4}\right )}}, \frac {2 \, {\left ({\left (273 \, A + 257 \, C\right )} \cos \left (d x + c\right )^{4} - {\left (21 \, A + 29 \, C\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (21 \, A + 19 \, C\right )} \cos \left (d x + c\right )^{2} - 5 \, C \cos \left (d x + c\right ) + 35 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {315 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right )^{5} + {\left (A + C\right )} a \cos \left (d x + c\right )^{4}\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{315 \, {\left (a d \cos \left (d x + c\right )^{5} + a d \cos \left (d x + c\right )^{4}\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 4.72, size = 412, normalized size = 1.75 \[ -\frac {\frac {315 \, {\left (\sqrt {2} A + \sqrt {2} C\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} + \frac {2 \, {\left (315 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 315 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (1050 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 840 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (1512 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 1638 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (1134 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 936 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) - {\left (357 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right ) + 383 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{4} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{315 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.22, size = 966, normalized size = 4.09 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {A+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^4\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{4}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________